import { DE_CREMENT, IN_CREMENT } from "../action/count";

export const count = (state = 100, action) => {
  switch (action.type) {
    case IN_CREMENT:
      state += 1;
      return state;
    case DE_CREMENT:
      state -= 1;
      return state;
    default:
      return state;
  }
};
